<?php
namespace app\index\logic;
use think\Model;
use \think\db;
//use app\index\model\Haven as haven_list;
class Haven extends model{
    //设置了模型的数据集返回类型的话，则可以简化使用
    protected $resultSetType = 'collection';

    public function test(){
        $where = function($query){
            $query -> where(array('is_hot'=>0,'status'=>array('neq',9)));
        };
        $res = Haven::all($where);
        dump($res ->toArray());
    }
}